/* VE base styles */
@use "src/styles/globals";

/*************************
  Component mods that implement the
  MMS app design guide
*************************/

img {
  max-width: 100%;
  height: auto;
}

.form-control:focus {
  border-color: globals.$brand-base;
}

.radio-with-label {
  margin-top: 0;
}

.modal-dialog {
  .modal-footer {
    margin-top: 0;
  }
}

.transclude-modal-instructions {
  margin-top: -6px;
}

.nav-pills {
  > li:active {
    > a {
      background-color: globals.$secondary-grey;
      color: globals.$white;
    }

    > a:hover,
    > a:focus {
      background-color: globals.$secondary-grey;
      color: globals.$white;
    }
  }
}

// table {
//   @extend .table;
//   width: auto!important;
// }

thead td,
table caption {
  font-weight: bold;
}

.table {
  tr {
    @include globals.transition(globals.$background-hover-transition);
  }
}

.content-table {
  @extend .table !optional;
  @extend .table-condensed !optional;
  @extend .table-bordered !optional;

  width: auto !important;

  p {
    margin: 0 0 5px;
  }
}

// Workaround for tables with no borders
.table[border="0"] {
  border: 0;

  // Cells
  > thead,
  > tbody,
  > tfoot {
    > tr {
      > th,
      > td {
        border: none;
      }
    }
  }

  // Remove top border from thead by default
  > caption + thead,
  > colgroup + thead,
  > thead:first-child {
    > tr:first-child {
      > th,
      > td {
        border: 0;
      }
    }
  }

  // Account for multiple tbody instances
  > tbody + tbody {
    border-top: none;
  }
}

.tooltip {
  .tooltip-inner {
    font-size: 12px;
    font-weight: globals.$default-font-weight;
  }

  &.bottom-left {
    padding: 5px 0;
    margin-top: 3px;

    .tooltip-arrow {
      top: 0;
      left: 13px;
      border-width: 0 5px 5px;
      border-bottom-color: #000;
    }
  }
}

.star-mandatory {
  color: globals.$red;
}

// warning icon for errors
.ve-error-icon {
  color: globals.$black;
  border: none;
  padding-left: 11px;
}

.ve-error-icon::before {
  content: "\f071";
  font-family: globals.$font-family-icon;
  margin-left: -14px;
  color: globals.$ve-warning-orange;
  font-size: 12px;
  position: absolute;
}
